Setup

9

root@1d888c92ee76:/# cd /opt/bgutbook_files/

root@1d888c92ee76:/opt/bgutbook_files#

From here you are ready to start reading the book and run the examples. Whenever you want to

exit you just need to type exit and Enter. When you want to go on you just need to follow again

the process, skipping the git clone part. That is

$ cd bgutbook_files

$ docker run -t -i -v $(pwd):/opt/bgutbook_files ubuntu /bin/bash

root@1d888c92ee76:/# cd /opt/bgutbook_files/

root@1d888c92ee76:/opt/bgutbook_files#

Advanced solution

If you want to have a Ubuntu container with the man pages you need to create a new Docker image.

I provide a configuration for such a machine as a Dockerfile in the bgutbook_ubuntu repository.

First of all clone the repository

$ git clone https://github.com/bgutbook/bgutbook_ubuntu.git

Then enter the directory and build the Docker image

$ cd bgutbook_ubuntu

$ docker build -t bgutbook_ubuntu .

Now Docker will create an image called bgutbook_ubuntu and store it in your system. At this point

you are ready to run it whenever you want to follow along the examples of the book.

Exit the directory with the Dockerfile, clone the repository with the example files, enter that

directory and run Docker. The commands are

$ cd ..

$ git clone https://github.com/bgutbook/bgutbook_files.git

$ cd bgutbook_files

$ docker run -t -i -v $(pwd):/opt/bgutbook_files bgutbook_ubuntu /bin/bash

root@1d888c92ee76:/#

As you can see the prompt changes, which tells you that you are inside the Linux container. Please

note that the number that follows the @ sign in the prompt is the ID of the running Docker container,

so it will be different for you. At that point move to the directory that contains the example files

inside the container